package com.ruoyi.slope.inspection.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.inspection.mapper.SlopeInspectionFencentMapper;
import com.ruoyi.slope.inspection.domain.SlopeInspectionFencent;
import com.ruoyi.slope.inspection.service.ISlopeInspectionFencentService;

/**
 * 边坡支护结构巡检Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-05
 */
@Service
public class SlopeInspectionFencentServiceImpl implements ISlopeInspectionFencentService 
{
    @Autowired
    private SlopeInspectionFencentMapper slopeInspectionFencentMapper;

    /**
     * 查询边坡支护结构巡检
     * 
     * @param id 边坡支护结构巡检主键
     * @return 边坡支护结构巡检
     */
    @Override
    public SlopeInspectionFencent selectSlopeInspectionFencentById(Long id)
    {
        return slopeInspectionFencentMapper.selectSlopeInspectionFencentById(id);
    }

    /**
     * 查询边坡支护结构巡检列表
     * 
     * @param slopeInspectionFencent 边坡支护结构巡检
     * @return 边坡支护结构巡检
     */
    @Override
    public List<SlopeInspectionFencent> selectSlopeInspectionFencentList(SlopeInspectionFencent slopeInspectionFencent)
    {
        return slopeInspectionFencentMapper.selectSlopeInspectionFencentList(slopeInspectionFencent);
    }

    /**
     * 新增边坡支护结构巡检
     * 
     * @param slopeInspectionFencent 边坡支护结构巡检
     * @return 结果
     */
    @Override
    public int insertSlopeInspectionFencent(SlopeInspectionFencent slopeInspectionFencent)
    {
        slopeInspectionFencent.setCreateTime(DateUtils.getNowDate());
        return slopeInspectionFencentMapper.insertSlopeInspectionFencent(slopeInspectionFencent);
    }

    /**
     * 修改边坡支护结构巡检
     * 
     * @param slopeInspectionFencent 边坡支护结构巡检
     * @return 结果
     */
    @Override
    public int updateSlopeInspectionFencent(SlopeInspectionFencent slopeInspectionFencent)
    {
        slopeInspectionFencent.setUpdateTime(DateUtils.getNowDate());
        return slopeInspectionFencentMapper.updateSlopeInspectionFencent(slopeInspectionFencent);
    }

    /**
     * 批量删除边坡支护结构巡检
     * 
     * @param ids 需要删除的边坡支护结构巡检主键
     * @return 结果
     */
    @Override
    public int deleteSlopeInspectionFencentByIds(Long[] ids)
    {
        return slopeInspectionFencentMapper.deleteSlopeInspectionFencentByIds(ids);
    }

    /**
     * 删除边坡支护结构巡检信息
     * 
     * @param id 边坡支护结构巡检主键
     * @return 结果
     */
    @Override
    public int deleteSlopeInspectionFencentById(Long id)
    {
        return slopeInspectionFencentMapper.deleteSlopeInspectionFencentById(id);
    }
}
